import Vue from 'vue'
import Router from 'vue-router'



Vue.use(Router)

export default new Router({
  mode:'history',//不显示'/#'
  //路由懒加载
  routes: [
    {
      path: '/',
      redirect:'/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: ()=>import("@/views/Login")
    },
    {
      path: '/register',
      name: 'Register',
      component: ()=>import("@/views/Register")
    },
    {
      path: '/personal_mainpage',
      name: 'PersonalMainpage',
      component: ()=>import("@/views/Personal_mainpage")
    },
    {
      path: '/create_center',
      name: 'Create_center',
      component: ()=>import("@/views/Create_center")
    },
    {
      path: '/create_1',
      name: 'Create_1',
      component: ()=>import("@/components/Create_1")
    },
    {
      path: '/create_2',
      name: 'Create_2',
      component: ()=>import("@/components/Create_2")
    },
    {
      path: '/shop',
      name: 'Shop',
      component: ()=>import("@/views/Shop")
    },
    {
      path: '/details/:pid/:pname',//传入参数
      name: 'Details',
      component: ()=>import("@/views/Details")
    },
    {
      path: '/welcomepage',
      name: 'Welcomepage',
      component: ()=>import("@/views/welcomepage")
    },

    {
      path: '/my_create',
      name: 'My_create',
      component: ()=>import("@/components/My_create")
    },
    {
      path: '/help',
      name: 'Help',
      component: ()=>import("@/views/Help")
    },
    {
      path: '/systeminfo',
      name: 'Systeminfo',
      component: ()=>import("@/components/Systeminfo")
    },
    {
      path: '/systeminfo_page',
      name: 'Systeminfo_page',
      component: ()=>import("@/views/Systeminfo_page")
    },
    {
      path: '*',
      component: ()=>import("@/views/NotFound")
    },
    
  ]
})
